import { getApprove } from '@/credit/mixin/wf'
import { getData } from '@vimi/utils-api'
export const wfKey = 'BH_APPROVAL'

const relatedTableName = 'guarantee_project'

export const getRelated = relatedId =>
  getData({
    table: relatedTableName,
    params: {
      'customer_related_id.eq': relatedId,
    },
  }).then(res => res?.data?.[0] ?? {})

const approveConfig = {}

// 获取审批流程配置信息
export const getApproveProcess = (queryId, user) => {
  const config = approveConfig
  return getApprove(
    {
      wfKey,
      queryId,
      config,
    },
    user
  )
}
